Revert accidental check-in. These changes are probably good, but premature at this point. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174625 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/vector b/include/vector index f4a41d6..876b7e5 100644 --- a/include/vector +++ b/include/vector
@@ -440,7 +440,7 @@ __vector_base<_Tp, _Allocator>::__destruct_at_end(const_pointer __new_last, false_type) _NOEXCEPT { while (__new_last != __end_) - __alloc_traits::destroy(__alloc(), _VSTD::__to_raw_pointer(--__end_)); + __alloc_traits::destroy(__alloc(), const_cast<pointer>(--__end_)); } template <class _Tp, class _Allocator> @@ -448,7 +448,7 @@ void __vector_base<_Tp, _Allocator>::__destruct_at_end(const_pointer __new_last, true_type) _NOEXCEPT { - __end_ = static_cast<pointer>(__new_last); + __end_ = const_cast<pointer>(__new_last); } template <class _Tp, class _Allocator> @@ -1550,7 +1550,7 @@ "vector::erase(iterator) called with an iterator not" " referring to this vector"); #endif - pointer __p = this->__begin_ + (__position - cbegin()); + pointer __p = const_cast<pointer>(&*__position); iterator __r = __make_iter(__p); this->__destruct_at_end(_VSTD::move(__p + 1, this->__end_, __p)); return __r;